/*
 * Search Engine Safe Url Regular Expression Patterns
 * Author: Scott Van Vliet, svanvliet@hitachiconsulting.com
 * Date: 2004-05-03
 */ 

using System;

namespace Boardworks.Utilities.SearchEngineSafe
{
	/// <summary>
	/// Summary description for SesRegexPattern.
	/// </summary>
	public struct SesRegexPattern
	{
		/// <summary>
		/// 
		/// </summary>
		public static string SesUrlPattern
		{
			get
			{
				return "([\\/].[^\\/]*.aspx)(.*)";
			}
		}

		/// <summary>
		/// 
		/// </summary>
		public static string QueryStringPattern
		{
			get
			{
				return "(.[^\\?]*)\\?(.*)";
			}
		}

		/// <summary>
		/// 
		/// </summary>
		public static string HrefPattern
		{
			get
			{
				return "<(a|link|img|script|input|form|td|th|table|body).[^>]*(href|src|action|background)=(\"|'|)(.[^\"'\\s]*)(\"|'|)[^>]*>";
			}
		}

		/// <summary>
		/// 
		/// </summary>
		public static string ImgPattern
		{
			get
			{
				return "<img.[^>]*>";
			}
		}

		/// <summary>
		/// 
		/// </summary>
		public static string BackgroundPattern
		{
			get
			{
				return "<(td|th|table|body).[^>]*sbackground=(\"|'|)(.[^\"'\\s]*)(\"|'|)[^>]*>";
			}
		}

		/// <summary>
		/// 
		/// </summary>
		public static string CssPattern
		{
			get
			{
				return "<link.[^>]*rel=(\"|'|)stylesheet(\"|'|).[^>]*>";
			}
		}

		/// <summary>
		/// 
		/// </summary>
		public static string ScriptPattern
		{
			get
			{
				return "<script.[^>]*src=.[^>]*>";
			}
		}

		/// <summary>
		/// 
		/// </summary>
		public static string AspxPattern
		{
			get
			{
				return "\\.aspx";
			}
		}

		/// <summary>
		/// 
		/// </summary>
		public static string HttpProtocolPattern
		{
			get
			{
				return "^http://";
			}
		}

		/// <summary>
		/// 
		/// </summary>
		public static string AbsolutePathPattern
		{
			get
			{
				return "^[\\/]";
			}
		}

		/// <summary>
		/// 
		/// </summary>
		public static string CurrentPathPattern
		{
			get
			{
				return "(.*[\\/]).*\\.aspx.*";
			}
		}
		
		/// <summary>
		/// 
		/// </summary>
		public static string JavascriptHtmlStatementPattern
		{
			get
			{
				return "^javascript:";
			}
		}

		/// <summary>
		/// 
		/// </summary>
		public static string MailToPattern
		{
			get
			{
				return "^mailto:";
			}
		}
		
		/// <summary>
		/// 
		/// </summary>
		public static string AnchorPattern
		{
			get
			{
				return "^#";
			}
		}
	}
}
